home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Visual Basic new SourceCode and Projects / Webpage Maker 2000 / Template.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-01-16  |  4.4 KB  |  137 lines

  1. VERSION 5.00
  2. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  3. Begin VB.Form Template 
  4.    Caption         =   " View source"
  5.    ClientHeight    =   3120
  6.    ClientLeft      =   60
  7.    ClientTop       =   630
  8.    ClientWidth     =   4455
  9.    Icon            =   "Template.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   3120
  12.    ScaleWidth      =   4455
  13.    StartUpPosition =   2  'CenterScreen
  14.    Begin RichTextLib.RichTextBox rtbDefault 
  15.       Height          =   3135
  16.       Left            =   0
  17.       TabIndex        =   0
  18.       Top             =   0
  19.       Width           =   4455
  20.       _ExtentX        =   7858
  21.       _ExtentY        =   5530
  22.       _Version        =   393217
  23.       Enabled         =   -1  'True
  24.       ScrollBars      =   3
  25.       DisableNoScroll =   -1  'True
  26.       RightMargin     =   50000
  27.       AutoVerbMenu    =   -1  'True
  28.       TextRTF         =   $"Template.frx":0442
  29.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  30.          Name            =   "Courier New"
  31.          Size            =   8.25
  32.          Charset         =   0
  33.          Weight          =   400
  34.          Underline       =   0   'False
  35.          Italic          =   0   'False
  36.          Strikethrough   =   0   'False
  37.       EndProperty
  38.    End
  39.    Begin VB.Menu mnuFile 
  40.       Caption         =   "&File"
  41.       Begin VB.Menu mnuSave 
  42.          Caption         =   "&Save"
  43.          Shortcut        =   ^S
  44.       End
  45.       Begin VB.Menu mnuSpacemeout2 
  46.          Caption         =   "-"
  47.       End
  48.       Begin VB.Menu mnuExit 
  49.          Caption         =   "E&xit"
  50.          Shortcut        =   ^X
  51.       End
  52.    End
  53.    Begin VB.Menu mnuFont 
  54.       Caption         =   "F&ont"
  55.       Begin VB.Menu mnuBiggerFont 
  56.          Caption         =   "&Bigger"
  57.          Shortcut        =   {F2}
  58.       End
  59.       Begin VB.Menu mnuSmallerFont 
  60.          Caption         =   "&Smaller"
  61.          Shortcut        =   {F1}
  62.       End
  63.       Begin VB.Menu mnuSpacemeout1 
  64.          Caption         =   "-"
  65.       End
  66.       Begin VB.Menu mnuCourier 
  67.          Caption         =   "&Courier New"
  68.          Shortcut        =   ^C
  69.       End
  70.       Begin VB.Menu mnuFixedSys 
  71.          Caption         =   "&Fixed Sys"
  72.          Shortcut        =   ^F
  73.       End
  74.    End
  75. Attribute VB_Name = "Template"
  76. Attribute VB_GlobalNameSpace = False
  77. Attribute VB_Creatable = False
  78. Attribute VB_PredeclaredId = True
  79. Attribute VB_Exposed = False
  80. '#################################################'
  81. '## ##  -----------------------------------  ## ##'
  82. '## ##  Program name: Webpage Maker 2000     ## ##'
  83. '## ##  Started in: October, 1999            ## ##'
  84. '## ##  Author: David VanHook                ## ##'
  85. '## ##  -----------------------------------  ## ##'
  86. '#################################################'
  87. '----------------------VARIABLE SECTION-----------------------'
  88. Dim strFiletoEdit As String
  89. Dim numSelected As Integer
  90. Dim savedFont As String
  91. '-------------------FORM ACTIVATE SECTION---------------------'
  92. Private Sub Form_Activate()
  93.   On Error Resume Next
  94.   If savedFont <> "" Then
  95.     rtbDefault.Font = savedFont
  96.   End If
  97.         
  98.   rtbDefault.LoadFile "Template.txt"
  99.   rtbDefault.Refresh
  100. End Sub
  101. '--------------------FORM RESIZE SECTION----------------------'
  102. Private Sub Form_Resize()
  103.   On Error Resume Next
  104.   rtbDefault.Width = Me.Width - 125
  105.   rtbDefault.Height = Me.Height - 700
  106. End Sub
  107. '------------------------FONT SECTION-------------------------'
  108. Private Sub mnuBiggerFont_Click()
  109.   On Error Resume Next
  110.   rtbDefault.Font.Size = rtbDefault.Font.Size + 1
  111. End Sub
  112. Private Sub mnuSmallerFont_Click()
  113.   On Error Resume Next
  114.   rtbDefault.Font.Size = rtbDefault.Font.Size - 1
  115. End Sub
  116. Private Sub mnuFixedSys_Click()
  117.   rtbDefault.Font = "Fixedsys"
  118.   savedFont = "Fixedsys"
  119. End Sub
  120. Private Sub mnuCourier_Click()
  121.   rtbDefault.Font = "Courier New"
  122.   savedFont = "Courier New"
  123. End Sub
  124. '--------------------FORM UNLOAD SECTION----------------------'
  125. Private Sub mnuExit_Click()
  126.   Me.Hide
  127. End Sub
  128. '----------------------REPLACE TEMPLATE-----------------------'
  129. Private Sub mnuSave_Click()
  130.   'On Error Resume Next
  131.   If MsgBox("Replace template page?", vbYesNo Or vbExclamation, " Overwrite file?") = vbYes Then
  132.     rtbDefault.SaveFile "Template.txt"
  133.   Else
  134.     Exit Sub
  135.   End If
  136. End Sub
  137.